import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './assets/css/global.css'
import './plugins/elements.js'
import 'element-ui/lib/theme-chalk/index.css'
import './assets/font-awesome/css/font-awesome.min.css'
import axios from 'axios'
// import ZkTable from '../../node_modules/vue-table-with-tree-grid/src/index.js'

// Vue.use(ZkTable)
// import error from 'error'
import ZkTable from 'vue-table-with-tree-grid'

Vue.component('tree-table', ZkTable)
Vue.config.productionTip = false

axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/'

// 添加请求拦截器
axios.interceptors.request.use(function(config) {
        // 在发送请求之前做些什么
        config.headers.Authorization = window.sessionStorage.getItem('token')
        return config
    })
    // Vue.prototype.$error = error
Vue.prototype.$http = axios
new Vue({
    router,
    render: h => h(App)
}).$mount('#app')